<!DOCTYPE html>
<html lang="zh">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<meta name="keywords" content="dromara.org" />
	<meta name="description" content="dromara.org" />
	<!-- 网页标签标题 -->
	<title>dromara(Open source organization)</title>
	<link rel="shortcut icon" href="/website/img/docsite.ico"/>
	<link rel="stylesheet" href="/website/build/documentation.css" />
</head>
<body>
	<div id="root"><div class="documentation-page" data-reactroot=""><header class="header-container header-container-normal"><div class="header-body"><a href="/website/zh-cn/index.html"><img class="logo" src="/website/img/dromara.png"/></a><div class="search search-normal"><span class="icon-search"></span></div><div class="header-menu"><img class="header-menu-toggle" src="/website/img/system/menu_gray.png"/><ul><li class="menu-item menu-item-normal"><a href="/website/zh-cn/index.html" target="_self">首页</a></li><li class="menu-item menu-item-normal menu-item-normal-active"><a href="/website/zh-cn/docs/soul/soul.html" target="_self">文档</a></li><li class="menu-item menu-item-normal"><a href="/website/zh-cn/blog/index.html" target="_self">博客</a></li><li class="menu-item menu-item-normal"><a href="/website/zh-cn/community/index.html" target="_self">社区</a></li></ul></div></div></header><div class="bar"><div class="bar-body"><img src="/website/img/system/docs.png" class="front-img"/><span>文档</span><img src="/website/img/system/docs.png" class="back-img"/></div></div><section class="content-section"><div class="sidemenu"><div class="sidemenu-toggle"><img src="https://img.alicdn.com/tfs/TB1E6apXHGYBuNjy0FoXXciBFXa-200-200.png"/></div><ul><li class="menu-item menu-item-level-1"><span>Soul</span><ul><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/soul/soul.html" target="_self">soul介绍</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/soul/db.html" target="_self">数据库设计</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/soul/config.html" target="_self">配置中心设计</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/soul/request.html" target="_self">请求参数设计</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/soul/selector.html" target="_self">选择器规则设计</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/soul/preFilter.html" target="_self">前置过滤器设计</a></li><li style="height:324px;overflow:hidden" class="menu-item menu-item-level-2"><span>插件介绍<img style="transform:rotate(0deg)" class="menu-toggle" src="/website/img/system/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/soul/divide.html" target="_self">divide插件</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/soul/dubbo.html" target="_self">dubbo插件</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/soul/springcloud.html" target="_self">springcloud插件</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/soul/rateLimiter.html" target="_self">rateLimiter插件</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/soul/monitor.html" target="_self">monitor插件</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/soul/waf.html" target="_self">waf插件</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/soul/sign.html" target="_self">sign插件</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/soul/rewrite.html" target="_self">rewrite插件</a></li></ul></li><li style="height:108px;overflow:hidden" class="menu-item menu-item-level-2"><span>部署文档<img style="transform:rotate(0deg)" class="menu-toggle" src="/website/img/system/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/soul/admin.html" target="_self">部署admin</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/soul/server.html" target="_self">部署server</a></li></ul></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/soul/http.html" target="_self">使用手册</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/soul/extend.html" target="_self">扩展文档</a></li></ul></li><li class="menu-item menu-item-level-1"><span>Hmily</span><ul><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/hmily/index.html" target="_self">介绍文档</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/hmily/configuration.html" target="_self">配置详解</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/hmily/admin.html" target="_self">启动admin</a></li><li style="height:144px;overflow:hidden" class="menu-item menu-item-level-2"><span>用户文档<img style="transform:rotate(0deg)" class="menu-toggle" src="/website/img/system/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/hmily/user-dubbo.html" target="_self">dubbo用户</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/hmily/user-motan.html" target="_self">motan用户</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/hmily/user-springcloud.html" target="_self">springcloud用户</a></li></ul></li><li style="height:108px;overflow:hidden" class="menu-item menu-item-level-2"><span>快速体验<img style="transform:rotate(0deg)" class="menu-toggle" src="/website/img/system/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/hmily/quick-start-dubbo.html" target="_self">quick-start-dubbo</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/hmily/quick-start-springcloud.html" target="_self">quick-start-springcloud</a></li></ul></li></ul></li><li class="menu-item menu-item-level-1"><span>raincat</span><ul><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/raincat/index.html" target="_self">介绍文档</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/raincat/start-manager.html" target="_self">启动raincat-manager</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/raincat/config.html" target="_self">配置详解</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/raincat/admin.html" target="_self">启动admin</a></li><li style="height:144px;overflow:hidden" class="menu-item menu-item-level-2"><span>用户文档<img style="transform:rotate(0deg)" class="menu-toggle" src="/website/img/system/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/raincat/user-dubbo.html" target="_self">dubbo用户</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/raincat/user-motan.html" target="_self">motan用户</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/raincat/user-springcloud.html" target="_self">springcloud用户</a></li></ul></li><li style="height:108px;overflow:hidden" class="menu-item menu-item-level-2"><span>快速体验<img style="transform:rotate(0deg)" class="menu-toggle" src="/website/img/system/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/raincat/quick-start-dubbo.html" target="_self">quick-start-dubbo</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/raincat/quick-start-springcloud.html" target="_self">quick-start-springcloud</a></li></ul></li></ul></li><li class="menu-item menu-item-level-1"><span>myth</span><ul><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/myth/index.html" target="_self">介绍文档</a></li></ul></li></ul></div><div class="doc-content markdown-body"><h3>@TxTransaction annotation详解</h3>
<ul>
<li>该注解为分布式事务的切面（AOP point），如果业务方的service服务需要参与分布式事务，则需要加上此注解。</li>
</ul>
<h3>TxTransactionBootstrap 详解：</h3>
<pre><code class="language-xml">
    <span class="hljs-tag">&lt;<span class="hljs-name">context:component-scan</span> <span class="hljs-attr">base-package</span>=<span class="hljs-string">"org.dromara.raincat.*"</span>/&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">aop:aspectj-autoproxy</span> <span class="hljs-attr">expose-proxy</span>=<span class="hljs-string">"true"</span>/&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">bean</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"txTransactionBootstrap"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"org.dromara.raincat.core.bootstrap.TxTransactionBootstrap"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"txManagerUrl"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"http://localhost:8761"</span>/&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"serializer"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"kryo"</span>/&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"nettySerializer"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"kryo"</span>/&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"bufferSize"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"4096"</span>/&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"nettyThreadMax"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"16"</span>/&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"refreshInterval"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"30"</span>/&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"delayTime"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"30"</span>/&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"heartTime"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"10"</span>/&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"compensation"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"true"</span>/&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"recoverDelayTime"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"60"</span>/&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"retryMax"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"3"</span>/&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"compensationRecoverTime"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"60"</span>/&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"compensationCacheType"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"db"</span>/&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"txDbConfig"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">bean</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"org.dromara.raincat.common.config.TxDbConfig"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"url"</span>
                          <span class="hljs-attr">value</span>=<span class="hljs-string">"jdbc:mysql://192.168.1.98:3306/tx?useUnicode=true&amp;amp;characterEncoding=utf8"</span>/&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"driverClassName"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"com.mysql.jdbc.Driver"</span>/&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"username"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"root"</span>/&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"password"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"123456"</span>/&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">bean</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">property</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">bean</span>&gt;</span>
</code></pre>
<ul>
<li>
<p>txManagerUrl：填写你启动的txManager的ip端口，注意添加http://前缀。</p>
</li>
<li>
<p>serializer :事务日志序列化方式，这里我推荐使用是kroy。当然也支持hessian,protostuff,jdk。在我们测试中表现为:
kroy&gt;hessian&gt;protostuff&gt;jdk。</p>
</li>
<li>
<p>nettySerializer： 与txManager通信对象的序列化方法，注意与txManager中的序列化方式配置一样。</p>
</li>
<li>
<p>bufferSize: disruptor的bufferSize,当高并发的时候，可以调大。注意是 2n次方。</p>
</li>
<li>
<p>nettyThreadMax ： netty客户端工作线程数量。</p>
</li>
<li>
<p>refreshInterval: 拉取txmanager配置信息间隔时间，单位秒。</p>
</li>
<li>
<p>delayTime ： 客户端与txmanager通信最大延迟时间。</p>
</li>
<li>
<p>heartTime ： 与txmanager保持心跳时间间隔，单位秒。</p>
</li>
<li>
<p>compensation： 是否需要补偿，一般情况下不需要，极端情况下设置为true。</p>
<ul>
<li>
<p>recoverDelayTime：事务恢复延迟时间，只有当 compensation：为ture才有用。</p>
</li>
<li>
<p>compensationRecoverTime： 补偿间隔时间 只有当 compensation：为ture才有用。</p>
</li>
<li>
<p>retryMax ： 事务补偿最大重试次数。</p>
</li>
</ul>
</li>
<li>
<p>compensationCacheType：使用何种方式存储日志，支持的有db，redis，mongo，zookeeper等。</p>
</li>
<li>
<p>接下来是最重要的事务日志的存储 在我们的压测中，推荐使用mongo。表现为 mongodb&gt;redis集群&gt;mysql&gt;zookeeper</p>
</li>
<li>
<p>如果你采用mongodb存储日志,配置如下(url可以配置成mongdb集群的url)</p>
</li>
</ul>
<pre><code class="language-xml">       <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"compensationCacheType"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"mongodb"</span>/&gt;</span>
       <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"txMongoConfig"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">bean</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"org.dromara.raincat.common.config.TxMongoConfig"</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"mongoDbUrl"</span>  <span class="hljs-attr">value</span>=<span class="hljs-string">"192.168.1.68:27017"</span>/&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"mongoDbName"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"happylife"</span>/&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"mongoUserName"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"xiaoyu"</span>/&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"mongoUserPwd"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"123456"</span>/&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">bean</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">property</span>&gt;</span>
</code></pre>
<ul>
<li>
<p>如果你采用redis存储日志,配置如下：</p>
<ul>
<li>redis单节点</li>
</ul>
</li>
</ul>
<pre><code class="language-xml">   <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"compensationCacheType"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"redis"</span> /&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"txRedisConfig"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">bean</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"org.dromara.raincat.common.config.TxRedisConfig"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"hostName"</span>
                      <span class="hljs-attr">value</span>=<span class="hljs-string">"192.168.1.68"</span>/&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"port"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"6379"</span>/&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"password"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">""</span>/&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">bean</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">property</span>&gt;</span>
</code></pre>
<ul>
<li>
<p>redis哨兵模式集群:</p>
<pre><code class="language-xml"><span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"compensationCacheType"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"redis"</span>/&gt;</span>
 <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"txRedisConfig"</span>&gt;</span>
     <span class="hljs-tag">&lt;<span class="hljs-name">bean</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"org.dromara.hmily.common.config.TxRedisConfig"</span>&gt;</span>
         <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"masterName"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"aaa"</span>/&gt;</span>
         <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"sentinel"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"true"</span>/&gt;</span>
         <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"sentinelUrl"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"192.168.1.91:26379;192.168.1.92:26379;192.168.1.93:26379"</span>/&gt;</span>
         <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"password"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"123456"</span>/&gt;</span>
     <span class="hljs-tag">&lt;/<span class="hljs-name">bean</span>&gt;</span>
 <span class="hljs-tag">&lt;/<span class="hljs-name">property</span>&gt;</span>
</code></pre>
</li>
<li>
<p>redis集群:</p>
<pre><code class="language-xml"><span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"compensationCacheType"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"redis"</span>/&gt;</span>
 <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"txRedisConfig"</span>&gt;</span>
     <span class="hljs-tag">&lt;<span class="hljs-name">bean</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"org.dromara.hmily.common.config.TxRedisConfig"</span>&gt;</span>
         <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"cluster"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"true"</span>/&gt;</span>
         <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"clusterUrl"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"192.168.1.91:26379;192.168.1.92:26379;192.168.1.93:26379"</span>/&gt;</span>
         <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"password"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"123456"</span>/&gt;</span>
     <span class="hljs-tag">&lt;/<span class="hljs-name">bean</span>&gt;</span>
 <span class="hljs-tag">&lt;/<span class="hljs-name">property</span>&gt;</span>
</code></pre>
</li>
<li>
<p>如果你采用zookeeper存储日志,配置如下：</p>
</li>
</ul>
<pre><code class="language-xml">       <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"compensationCacheType"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"zookeeper"</span>/&gt;</span>
       <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"txZookeeperConfig"</span>&gt;</span>
           <span class="hljs-tag">&lt;<span class="hljs-name">bean</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"org.dromara.hmily.common.config.TxZookeeperConfig"</span>&gt;</span>
               <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"host"</span>  <span class="hljs-attr">value</span>=<span class="hljs-string">"192.168.1.73:2181"</span>/&gt;</span>
               <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"sessionTimeOut"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"100000"</span>/&gt;</span>
               <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"rootPath"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"/tcc"</span>/&gt;</span>
           <span class="hljs-tag">&lt;/<span class="hljs-name">bean</span>&gt;</span>
       <span class="hljs-tag">&lt;/<span class="hljs-name">property</span>&gt;</span>
</code></pre>
</div></section><footer class="footer-container"><div class="footer-body"><img src="/website/img/dromara.png"/><div class="cols-container"><div class="col col-12"><h3>免责声明</h3><p>任何单位或个人转载本网站的所有相关信息，请注明来源。</p></div><div class="col col-6"><dl><dt>文档</dt><dd><a href="/website/zh-cn/docs/soul/soul.html" target="_self">概览</a></dd><dd><a href="/website/zh-cn/docs/soul/soul.html" target="_self">快速开始</a></dd><dd><a href="/website/zh-cn/docs/soul/soul.html" target="_self">开发者指南</a></dd></dl></div><div class="col col-6"><dl><dt>资源</dt><dd><a href="/website/zh-cn/blog/index.html" target="_self">博客</a></dd><dd><a href="/website/zh-cn/community/index.html" target="_self">社区</a></dd></dl></div></div><div class="copyright"><span>Copyright ©2018 549477611@qq.com by xiaoyu</span></div></div></footer></div></div>
	<script src="https://f.alicdn.com/react/15.4.1/react-with-addons.min.js"></script>
	<script src="https://f.alicdn.com/react/15.4.1/react-dom.min.js"></script>
	<script>
		window.rootPath = '/website';
  </script>
	<script src="/website/build/documentation.js"></script>
</body>
</html>